package com.iss.umservice.dao;

import java.util.List;

import com.iss.iframework.common.errcode.AppRuntimeException;
import com.iss.umservice.bean.AccountStationRefBean;
import com.iss.umservice.bean.StationBean;
import com.iss.umservice.bean.UserAccount;
import com.iss.umservice.bean.UserInfo;
import com.iss.umservice.common.UMResourceType;

/**
 * �˻���ݴ����
 * 
 * @author songzou
 * @date 2012-8-10
 */
public interface AccountDao
{
    
    /**
     * ����˻�Code��ѯ�û��˻���Ϣ
     * 
     * @param userCode
     *            �˻���
     * @return
     */
    UserAccount queryUserAccountByUserCode(String userCode);
    
    /**
     * ����˻�ID��ѯ��Ӧ���û���Ϣ
     * 
     * @param accountId
     *            �˻�ID
     */
    UserInfo queryUserInfoByUserAccountId(String accountId);
    
    /**
     * ����û�ID��ѯ�û���Ϣ
     * 
     * @param userIdentifier
     *            �û�Ψһ��ʶ
     */
    UserInfo queryUserInfoById(String userIdentifier);
    
    /**
     * ����˻�ID��ѯָ����ϵͳ��ָ����Դ��Ϣ�б�
     * 
     * @param accountId
     *            �˻�ID
     * @param systemId
     *            ϵͳID
     * @param resourceType
     *            ��Դ����
     * @return
     */
    List<String> queryResourceValuesByCondition(String accountId,
            String systemId, UMResourceType resourceType);
    
    /**
     * ���������ѯ�˺���Ϣ
     * 
     * @param accountCode �˺���
     * @param companyName 
     * @return bean
     */
    List<UserAccount> queryUserAccountInfo(String accountCode, String companyName, int row,
            int offset) throws AppRuntimeException;;
    
    /**
     * ����˺����λ�Ĺ�ϵ
     * 
     * @param bean 
     * @return
     */
    void insertAccount_Station_Ref(List<AccountStationRefBean> bean)
            throws AppRuntimeException;
    
    /**
     * �������ͳ���˺�
     * 
     * @param accountCode �˺����
     * @param companyName 
     * @return
     */
    int countAccountInfo(String accountCode, String companyName) throws AppRuntimeException;
    
    /**
     * ���IDɾ���˺���Ϣ
     * 
     * @param
     * @return
     */
    void delAccountInfoById(String accountId) throws AppRuntimeException;
    
    /**
     * �޸��˺���Ϣ
     * 
     * @param bean
     * @return
     */
    void modifyAccountInfo(UserAccount bean) throws AppRuntimeException;
    
    /**
     * ���ID��ѯ�˺���Ϣ
     * 
     * @param accountId �˺�Id
     * @return
     */
    UserAccount queryAccountInfoById(String accountId)
            throws AppRuntimeException;
    
    /**
     * ����˺���Ʋ�ѯ�˺����λ�Ķ�Ӧ��ϵ
     * 
     * @param accountCode �˺����
     * @return
     */
    List<AccountStationRefBean> queryAccount_Station_Ref(String accountCode)
            throws AppRuntimeException;
    
    /**
     * �����˻���Ϣ
     * 
     * @param accountBean      
     * @return
     */
    void addUserAccountInfo(UserAccount accountBean);
    
    /**
     * �޸�����
     * 
     * @param accountBean      
     * @return
     */
    void modifyUAPasswordInfo(UserAccount accountBean);
    
    /**
     * ���ID��ѯ��λ���˺Ŷ�Ӧ��Ϣ
     * 
     * @param accountId �˺�Id
     * @return
     */
    List<StationBean> queryStationInfoByAccountId(String accountId);

    List<UserInfo> queryStationUserList(String stationId, String deptId);

    String checkAccountCode(String accountCode);

	int changePassword(String accountCode, String newPassword);

   String getStationIdForComp();

	String queryUserType(String accountId);
    
}
